From c8e525b16bc6752f710b649c5a8d5ea706fde747 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 29 Jan 2008 11:47:42 +0000 Subject: [PATCH] x86: Fix HVM hypercall preemption causing guest crash. Signed-off-by: Yu Zhao --- xen/arch/x86/domain.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index d7478c178b..618542f20f 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1506,7 +1506,12 @@ unsigned long hypercall_create_continuation( { regs = guest_cpu_user_regs(); regs->eax = op; - regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */ + /* + * For PV guest, we update EIP to re-execute 'syscall' / 'int 0x82'; + * HVM does not need this since 'vmcall' / 'vmmcall' is fault-like. + */ + if ( !is_hvm_vcpu(current) ) + regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */ #ifdef __x86_64__ if ( !is_hvm_vcpu(current) ? -- 2.30.2